package com.tsd.system.service;

import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysUser;
import com.tsd.system.entity.SysUserRole;
import com.tsd.system.entity.SysUserRoleExt;

import java.util.List;
import java.util.Map;


/**
 * 描述：SysUserRole服务实现层接口
 *
 * @author Hillpool
 * @date 2019/03/12 12:20:51
 */
public interface SysUserRoleService {

    /**
     * 描述：根据id获取SysUserRole
     *
     * @param id
     */
    SysUserRole getSysUserRoleById(Long id) throws Exception;

    /**
     * 描述：保存或更新SysUserRole
     *
     * @param record
     * @param opUser
     */
    void saveSysUserRole(SysUserRole record, SysUser sysUser) throws Exception;


    /**
     * 描述：保存或更新SysUserRole
     *
     * @param record
     * @param opUser
     */
//    void saveSysUserRoleById(SysUserRole record, SysUser opUser) throws Exception;

    /**
     * 描述：根据id删除SysUserRole
     *
     * @param id
     */
    void deleteSysUserRole(Long id) throws Exception;

    /**
     * 描述：根据params分页查询SysUserRole
     *
     * @param params
     * @param page
     */
    List<SysUserRole> findSysUserRoles(Map<String, Object> params, PageBean page) throws Exception;

    void saveRoleList2User(String userId, List<String> roleIdList, boolean b, SysUser opUser) throws Exception;

    void deleteLogicalUserRoleById(Long id, SysUser sysUser) throws Exception;

    List<SysUserRoleExt> findRoleListByUserId(Map<String, Object> params) throws Exception;

    List<SysUserRoleExt> findByUserId(String userSid) throws Exception;
}
